<template>
<span :class="wrapper_name">
  <btn_group v-if="btns.is_topMenu_btns&&is_topMenu_btns" @btnClick="btnClick" :btns="is_topMenu_btns" field="is_topMenu"
             title="顶级分类"></btn_group>
</span>
</template>
<script type="text/ecmascript-6">
    import tool from 'src/util/tool';
    import util from '_util/index';
    import logic from '_logic';
    import in_array from 'in_array';

    import btn_group from 'components/common/btn_group';


    export default {
        data() {
            return {
                is_topMenu_btns: null
            }
        },
        components: {
            btn_group
        },
        methods: {
            show_top_menu(){

            },
            btnClick(flag, field){
                this.$router.push(`/page/list?ctl=Menu&${field}=${flag}`)
            },
            getBtns(){
                let obj =
                    {
                        'yes_no': 'is_topMenu_btns'
                    }

                logic.list.getListOpBtns(this, obj)
            }
        },
        computed: {
            ctl(){
                return this.$route.query.ctl;
            },
            is_admin(){
                return util.is_admin(this);
            },
        },
        props: ['wrapper_name','btns'],
        created() {
            this.getBtns();
        },
    };
</script>
<style rel="stylesheet/less" lang="less">@dir: "header/";</style>
